package com.alex.serializer;

import java.util.Map;
import org.apache.commons.lang3.SerializationUtils;
import org.apache.kafka.common.header.Headers;
import org.apache.kafka.common.serialization.Deserializer;

/**
 * @ClassName UserdefineDeserializer
 * @Description TODO
 * @Author zjg
 * @Date 2021/12/616:45
 * @Version 2.0
 */

public class UserdefineDeserializer implements Deserializer<Object> {

  @Override
  public void configure(Map<String, ?> configs, boolean isKey) {
    System.out.println("oonfgure");
  }

  @Override
  public Object deserialize(String s, byte[] bytes) {
    return SerializationUtils.deserialize(bytes);
  }

  @Override
  public void close() {
    System.out.println("close");
  }
}
